<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增地区关系')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-districts-add">
            <div class="form-group">
                <label class="col-sm-3 control-label">编号：</label>
                <div class="col-sm-8">
                    <input name="id" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">上级编号：</label>
                <div class="col-sm-8">
                    <input name="pid" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">层级：</label>
                <div class="col-sm-8">
                    <select name="deep" class="form-control">
                        <option value="0">省</option>
                        <option value="1">市</option>
                        <option value="2">区/县</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">名称：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">拼音：</label>
                <div class="col-sm-8">
                    <input name="pinyin" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">拼音缩写：</label>
                <div class="col-sm-8">
                    <input name="pinyinShor" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">扩展名：</label>
                <div class="col-sm-8">
                    <input name="extName" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "system/districts"
        $("#form-districts-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-districts-add').serialize());
            }
        }
    </script>
</body>
</html>